In the prior art, many message delivery systems exist which offer assured message delivery between endpoints, such as between different applications. Assured (sometimes also called guaranteed or persistent) message delivery offers a once and only once message delivery semantics, although other delivery semantics can also be offered as well, such as deliver at most once, deliver at least once, etc.
Such messaging systems provide for loosely coupled message delivery between the message source and the receiving application (for one-to-one delivery) or receiving applications (for one-to-many delivery). A receiving application may be offline when a message is sent, or part of the network may be unavailable at the time, and the messaging system must persist the message and deliver it to the application when it becomes available or when a communications path to it becomes available. As well, the system ensures message delivery to the receiving application even in the presence of message loss between network elements, as may occur due to events such as communications errors, power outages, etc.
Examples of prior art messaging systems are WebSphere MQ from International Business Machines Corporation and a number of implementations of the Java Messaging Service (JMS) which is known in the art.
In prior art assured delivery systems, messages can be sent by a message source to a destination message queue or to a destination topic group. A destination queue is suitable for one-to-one message delivery. Note however that multiple applications can receive messages from a destination queue, e.g. for load balancing or resiliency, but a given message is only received by one application from the queue. With publish-subscribe style message delivery, a message is published to a topic, and can be received by one or more applications that subscribe to messages from that topic. Some messaging systems such as JMS also allow for “message selectors” to allow for filtering of the messages based on matching rules on certain header fields so that an application can, for example, receive a subset of the messages from a topic based on the message selector filtering rules. Content-based routing message delivery systems also allow a message to be delivered to one or more recipients based on their subscriptions to the content of a message, as opposed to a pre-defined topic.
In order to provide assured message delivery in the face of any type of failure, including loss of power, the restart of the messaging system etc., messages must be persisted to non-volatile storage. Typically disk drives are utilized due to the large message volume and the requirement to be able to persist messages for a long period of time, e.g. when the destination for the message is not available. In order to provide for assured delivery, the message must be guaranteed to be in non-volatile storage before the message sender is sent an acknowledgement that the message has been accepted by the messaging system. The act of storing the message adds significant latency to the processing of the message at a message processing node, and even with non-volatile caches, the message latency and throughput is significantly affected by this requirement. Such non-volatile caches are typically implemented as part of the disk sub-system, for example, as part of the disk controller logic. For example, refer to U.S. Pat. No. 5,581,726.
The use of write-back cache logic, where once the data is successfully written to the non-volatile memory cache of the disk sub-system the messaging system is free to continue processing the message without waiting for the message to be written to the physical disk device(s) does reduce the message latency, but the latency is still quite high due to the significant processing necessary through the operating system and file system logic. Moreover, the messaging throughput from a relatively small number of sources is limited still by the disk write latency of the disk drives—again because the next message cannot be accepted from a sender until the previous one has been written to disk. The disk cache serves as a front-end to the disk drives, so each data write will ultimately be placed onto the disk storage media, which has a limited data write rate. The write data rate can be increased by utilizing disks in a RAID configuration, for example, as is known in the art, but the write speed will always be much slower compared to the message processing capability of the messaging system. This limits the overall assured delivery messages rate of the system.
Some messaging systems offer an option to use a lower-level of reliability, where messages are allowed to be queued in the volatile data structures of the operating system's file system (in RAM) and the message is considered to have been saved even though is may not have yet reached a non-volatile disk cache (if one is provided) or the disk itself. This option is provided to increase messages throughput and decrease message latency at the expense of reliability. With such an option, a power failure can result is messages being lost. To increase reliability, external uninterruptible power supplies can further be utilized to power the messaging system so that in the event of a power failure, the file system RAM data structures can be flushed onto the physical storage medium before the messaging system does a controlled shutdown. While this increases reliability, and performance is increased through the use of RAM buffering, the throughput is again limited ultimately by the sustained disk write speed. Moreover, the use of interruptible power supplies normally include battery technology, which need to be maintained and has a limited lifetime.
While assured delivery systems of the past were also used heavily in batch-oriented systems, where messages may be queued for long periods before being consumed by the destination application, many mission-critical systems, such as trading applications in financial services now are required to process extremely high message rates and require very low latency across the messaging system, such as much less than one millisecond. In such applications, a given message is typically only queued in the messaging system for a very short period of time, and once successfully consumed by the destination application or applications, the message no longer has to be retained by the messaging system. However, in such applications there is still a requirement for assured messaging and assurances that messages will not be lost by the messaging system (requiring every message to be written to disk).
As an example of current performance levels of the prior art, refer to “JMS Performance Comparison”, October 2004, Krissoft Solutions, the contents of which are incorporated herein by reference. This study shows that for the persistent messaging benchmark, the fastest vendor surveyed, a scenario of 1 publisher, 1 subscriber and 1 topic yielded a message rate of only 1654 messages per second, and for 10 publishers, 10 subscribers and 10 topics the message rate was only 4913 messages per second. As a comparison, the same study showed that for the non-persistent messaging benchmark, a scenario of 1 publisher, 1 subscriber and 1 topic yielded a message rate of 24457 messages per second (14.7 times faster than the persistent messaging benchmark), and for 10 publishers, 10 subscribers and 10 topics the message rate was 37268 messages per second (7.6 times faster than the persistent messaging benchmark). It can be seen that there is a very large performance penalty for persistent messaging over non-persistent messaging, and at least an order of magnitude increase in the persistent messaging rate is needed, and the message latency also has to be reduced as low as possible.
It is highly desirable to provide a messaging system which can offer assured message delivery which offers the required reliability and can also offer both very low message latency and very high message throughput.